-- card: 2961 from stack: in -- bmap block id: 3690 -- flags: 4000 -- background id: 2576 -- name: theCard -- part 1 (field) -- low flags: 04 -- high flags: 0007 -- rect: left=151 top=0 right=264 bottom=256 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: thePassList -- part 2 (button) -- low flags: 00 -- high flags: A002 -- rect: left=0 top=0 right=51 bottom=124 -- title width / last selected line: 0 -- icon id / first selected line: 128 / 128 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: GenerateÉ ----- HyperTalk script ----- on mouseUp global ranNum,thePass,howManyTimes,howManyLetters,theCounter,theLetters put "" into card field "thePassList" ask "How many passwords should be generated?" with 50 if the result is "Cancel" or it = 0 then exit mouseUp put it into howManyTimes ask "How many letters per password?" with 8 if the result is "Cancel" or it = 0 then exit mouseUp put it into howManyLetters if (howManyTimes*howManyLetters)>29996 then answer "The amount of passwords you have specified exceeds the allowable" & " limit. Not all of them will be generated. Do you still wish to continue?" with "Yes" or "No" if it is "No" then exit mouseUp end if put 0 into theCounter put 0 into theLetters repeat howManyTimes put "" into thePass put 0 into theLetters repeat while theLetters64 and ranNum<91 or ranNum>96 then put numToChar(ranNum) after thePass add 1 to theLetters set cursor to busy end if end repeat put thePass & return after card field "thePassList" if theLetters=howManyLetters then add 1 to theCounter put "Processing: " & theCounter &"/" & howManyTimes into card field "Status" if length (card field "thePassList")>(29996-howManyLetters) then answer "The field is full. Only " & theCounter & " passwords were generated." with "Sorry" exit mouseup end if end repeat put "Processing: Done" into card field "Status" end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: A002 -- rect: left=0 top=50 right=99 bottom=124 -- title width / last selected line: 0 -- icon id / first selected line: 129 / 129 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ExportÉ ----- HyperTalk script ----- on mouseUp global aNumber,theListIsEmpty,theLength put 1 into aNumber put "true" into theListIsEmpty put length(card field "thePassList") into theLength repeat theLength if theListIsEmpty="false" then exit repeat put charToNum(character aNumber of card field "thePassList") into theCharacter if theCharacter>32 and theCharacter≠127 and theCharacter≠202 then put "false" into theListIsEmpty end if add 1 to aNumber end repeat if theListIsEmpty="false" then ask file "Create a password file:" with "PasswordList" if the result is "Cancel" or it is empty then exit mouseUp put it into fileName open file fileName write card field "thePassList" to file fileName close file fileName else answer "There is nothing to export." with "Sorry" end if end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: A002 -- rect: left=0 top=98 right=149 bottom=124 -- title width / last selected line: 0 -- icon id / first selected line: 130 / 130 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: AboutÉ ----- HyperTalk script ----- on mouseUp put "Random Password Generator (HC)" & return after answerString put "© 1995 Paul Schreiber " & return after answerString put "version 1.1, August 19th, 1995" & return after answerString put "This is completely free!" & return after answerString put "No warranty!" & return after answerString put "Commercial Distribution requires permission!" after answerString answer answerString with "Okay" end mouseUp -- part 6 (field) -- low flags: 05 -- high flags: 0002 -- rect: left=0 top=148 right=164 bottom=124 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: Status -- part contents for card part 6 ----- text ----- Processing: Done